// 用于判断  VITE_ROUTER_AUTOLOAD 是否开启自动注册路由,如果开启则自动注册路由,否则手动注册路由,匹配module文件夹下面的所有文件来进行注册路由
import env from "@/utils/env";
import { RouteRecordRaw } from "vue-router";
import getRoutes from "./view"
import autoloadModuleRoutes from "./module"
let routes = [] as RouteRecordRaw[]

if(env.VITE_ROUTER_AUTOLOAD){
    routes = getRoutes()
}else {
  routes = autoloadModuleRoutes()
  console.log(routes,'routes')
}


export default routes